package com.dongxing.concyrrency.chapter11;

import java.util.Arrays;
import java.util.Optional;

/**
 * @author XavierDong
 **/
public class Test2 {


    public void test() {

        Arrays.asList(Thread.currentThread().getStackTrace()).stream()
                .filter(e -> !e.isNativeMethod())
                .forEach(e -> Optional.ofNullable(e.getClassName() + ":" + e.getMethodName() + ":" + e.getLineNumber()).ifPresent(System.out::println));


    }
}
